#include <stdio.h>
int main()
{
    int day = 0;
    scanf("%d",&day);
    switch(day >= 1 && day <= 7)
    {
        case 1:
        printf("3");
        case 2:
        printf("4");
        break;
        case 3:
        printf("5");
        break;
        case 4:
        printf("6");
        break;
        case 5:
        printf("7");
        break;
        case 6:
        printf("1");
        break;
        case 7:
        printf("2");
        break;
    }
    return 0;
}
